﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="keyword.aspx.cs" Inherits="weikeweixin.web.admin.wechat.keyword" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>IdeaSoft软件</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="Keywords" content="IdeaSoft软件" />
    <meta name="Description" content="IdeaSoft软件微信" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/bootstrap.responsive.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/style.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/themes.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/todc_bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/inside.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/resource.css" />

    <script type="text/javascript" src="/Scripts/JQuery.min.js"></script>
    <script type="text/javascript" src="/Scripts/Bootstrap.min.js"></script>
    <script type="text/javascript" src="/Scripts/JQuery.form.min.js"></script>
    <script type="text/javascript" src="/Scripts/JQuery.validate.min.js"></script>
    <script type="text/javascript" src="/Scripts/JQuery.validate.methods.js"></script>
    <script type="text/javascript" src="/Scripts/resource.js"></script>
    <script type="text/javascript" src="/Scripts/JQuery.cookie.js"></script>
    <script type="text/javascript" src="/Scripts/Inside.js"></script>
    
    
    <!--[if IE 7]>
            <link href="/css/Bootstrap/font_awesome_ie7.css" rel="stylesheet" />
        <![endif]-->
    <!--[if lte IE 8]>
            <script src="/Scripts/excanvas_min.js"></script>
        <![endif]-->
    <!--[if lte IE 9]>
            <script src="/Scripts/watermark.js"></script>
        <![endif]-->
    <style type="text/css">
        option
        {
            padding: 5px;
        }
  </style>
</head>
<body>
    <div id="main">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    <div class="box">
                        <div class="box-title">
                            <div class="span10">
                                <h3>
                                    <i class="icon-edit"></i>
                                    关键字</h3>
                            </div>
                            <div class="span2">
                                <a class="btn" href="Javascript:window.history.go(-1)">返回</a></div>
                        </div>
                        <form  action="keyword.aspx" method="post" class="form-horizontal form-validate">
                        <input name="action" value="keyword" style="display: none;" />
                        <%if (Request.QueryString["id"] != null)
                          { %>
                        <input name="id" value="<%=Request.QueryString["id"]%>" style="display: none;" />
                        <%} %>
                        
                        <div class="box-content">
                            <div class="control-group">
                                <label for="name" class="control-label">
                                    关键字：</label>
                                <div class="controls">
                                    <input id="name" name="keyword_name" value="<%=keywordmodel.keyword_name %>" class="input-medium" data-rule-required="true"
                                        data-rule-maxlength="50" type="text">
                                    <span class="maroon">*</span><span class="help-inline"></span>
                                </div>
                            </div>
                            <div id="res_block">
                                <div class="control-group">
                                    <script type="text/javascript">
                                        $(function () {
                                            var type = '<%=keywordmodel.keyword_type %>';
                                            $("#type").val(type);
                                            var article_id = '<%=keywordmodel.article_id %>';
                                            $("#article_id").val(article_id);

                                            switch (type) {
                                                case "news":
                                                    $("#r_news").removeClass("hide");
                                                    break;
                                                case "text":
                                                    $("#r_text").removeClass("hide");
                                                    break;
                                                default:
                                                    $("#r_text").removeClass("hide");
                                                    break;
                                            }
                                        })
                                    </script>
                                    <label for="type" class="control-label">
                                        类型：</label>
                                    <div class="controls">
                                        <select id="type" name="keyword_type" class="input-medium">
                                            <option value="text">内容</option>
                                            <option value="news">图文</option>
                                        </select>
                                    </div>
                                </div>
                                <div id="r_text" class="control-group r-module hide">
                                    <div class="control-group">
                                        <label for="description" class="control-label">
                                            内容：</label>
                                        <div class="controls">
                                            <textarea id="description" name="keyword_text" class="input-xlarge" style="width: 274px; height: 120px;" data-rule-required="true"><%=keywordmodel.keyword_text%></textarea>
                                            
                                            <span class="maroon">*</span><span class="help-inline">不能为空</span>
                                        </div>
                                    </div>
                                </div>
                                <div id="r_news" class="control-group r-module hide">
                                    <div class="control-group">
                                        <label for="content" class="control-label">
                                            链接：</label>
                                        <div class="controls">
                                           <select id="article_id" name="article_id">
                                           <%if (dtarticle.Rows.Count > 0)
                                             { for(int i = 0 ; i < dtarticle.Rows.Count; i ++) { %>
                                           <option value="<%=dtarticle.Rows[i]["article_id"] %>"><%=dtarticle.Rows[i]["article_title"]%></option>
                                           <%} }%>
                                           </select>
                                                                                   </div>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <button type="submit" class="btn btn-primary">
                                        保存</button>
                                    <button type="button" class="btn" onclick="window.history.go(-1);">
                                        取消</button>
                                </div>
                            </div>
                        </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="fallr-overlay">
    </div>
</body>
</html>
<script type="text/javascript">
    window.document.onkeydown = function (e) {
        if ('' == document.activeElement.id) {
            var e = e || event;
            var currKey = e.keyCode || e.which || e.charCode;
            if (8 == currKey) {
                return false;
            }
        }
    };

   
    $(function () {
        var resource = Resource.create();
        var ins = Resource.instance['res_block'];
        ins.result = ins.result || {};
        ins.result.wuid = 27743;

        window.ICON();

        $("#icon_i").removeAttr("class");
        
    })
    
</script>
